package cloud.kiko.psn.mq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class RabbitMQConsumer {
    //Rabbit消息队列queue的消费者
    @RabbitListener(queues = {"queue"})
    public void consume(String message) {
        log.info("MQ消费消息：{}",message);
    }

    @RabbitListener(queues = {"queue-1"})
    public void consume1(String message) {
        log.error("MQ消费消息：{}",message);
    }

}
